Dataset Generation

We simply generate synthetic stories and associated q&a's for those stories


In [1]:
%load_ext autoreload
%autoreload 2

In [2]:
from dataset.generator import *
import pickle

world = World()
NSTORIES = 1000
stories = []
for _ in xrange(NSTORIES):
    stories.append(world.genStory())

f = open("stories.pck", "wb")
pickle.dump(stories, f)
f.close()

In [3]:
stories = pickle.load(open("stories.pck", "rb"))
print stories[0]


['hasan parka gitti .', 'sinan eva gitti .', 'hasan servisa gitti .', 'emre tershanea gitti .', 'ali boluma gitti .', 'hasan nerede ?,servis', 'sinan nerede ?,ev', 'emre nerede ?,tershane', 'ali nerede ?,bolum']

In [ ]: